const mongoose = require('mongoose')
const foodType = require('@root/initDatas/foodType.json')
const chalk = require('chalk')

const foodTypeSchema = new mongoose.Schema({
  business_flag: Number,
  description: String,
  id: Number,
  image_hash: String,
  is_in_serving: Boolean,
  is_personalized: Boolean,
  link: String,
  more: String,
  name: String,
  name_color: String,
  position: Number
})


const foodTypeModel = mongoose.model('foodType', foodTypeSchema)

// foodTypeModel.insertMany(foodType, (err) => {
//   if(err) return console.log(
//     chalk.red("insert foodType failed...")
//   )
// })

module.exports = foodTypeModel